# ================ 导入组件 =================
from django.urls import path
# ================= 导入drf 路由类 ================
from rest_framework.routers import DefaultRouter
# ================ 导入views =========================
from taskweb import views

# === 1. 实例化 =====
router = DefaultRouter()

# === 2. 注册views ======
router.register('taskorders', views.TaskOrderViews, basename="taskorders")


urlpatterns = [
    path('upload/', views.UploadView.as_view()),
    path('upload/excel/', views.UploadExcelView.as_view()),
    path('echarts/', views.EchartsView.as_view()),
]

#===== 3. 附加到urlpatterns ========
urlpatterns += router.urls
